@import "header.html"
<link rel="stylesheet" href="../css/indent.css">
<body>
<header class="fxj-header">
    <span class="back" onclick="fxj.closeWin()" style="display: none">
        <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-jiantou"></use>
        </svg>
    </span>
    <h1 class="fxj-title">订单管理</h1>
</header>

<main id="main">
    <div class="tab-bar">
        <span :class="{active:!view.end}" @click="toggleEnd(false)">进行中</span>
        <span :class="{active:view.end}" @click="toggleEnd(true)">已结束</span>
    </div>

    <div class="tabs">
        <div id="underway" v-show="!view.end">
            <ul class="indent-group">
                <li class="indent-item" v-for="indent of data.going">
                    <div class="indent-title" @click="goPage('house_res_detail.html?id='+indent.house_id)">
                        <span class="title" v-cloak>{{indent.title}}</span>
                        <span class="highlight" v-cloak>{{indent.status.value}}</span>
                    </div>
                    <i class="tieku"></i>
                    <div class="indent-info" @click="checkIndentDetail(indent.oid)">
                        <img class="indent-img" :src="fixImgUrl(indent.img)" alt="">
                        <div>
                            <span v-cloak>{{indent.start_date.split(" ")[0]}}至{{indent.end_date.split(" ")[0]}}</span>&nbsp;<span>共{{indent.day_total}}晚</span><br>
                            <span v-cloak> {{indent.lease_type.value}}- {{indent.guest_count}}人入住</span><br>
                            <span v-cloak>订单总额：<span class="highlight">￥{{indent.pay_price}}</span></span>
                        </div>
                    </div>
                    <i class="tieku"></i>
                    <div class="btn-group" v-if="indent.status.status==1">
                        <span @click="rejectIndent(indent.oid)">拒绝订单</span>
                        <span class="highlight" @click="acceptOrder(indent.oid)">接受订单</span>
                    </div>

                    <div class="btn-group" v-if="indent.status.status==2||indent.status.status==22"
                         @click="contactTheTenant(indent)">
                        <span class="">联系房客</span>
                    </div>

                    <div class="btn-group" v-if="indent.status.status==3||indent.status.status==4"
                         @click="contactTheTenant(indent)">
                        <span class="">联系房客</span>
                    </div>

                    <!--<div class="btn-group" v-if="indent.status.status===5">
                        <span class="highlight">操作押金</span>
                        <span class="highlight">立即点评</span>
                    </div>-->


                    <!--<div class="btn-group"  v-if="indent.status.status===0">
                        <span >删除订单</span>
                    </div>-->

                </li>
            </ul>
        </div>

        <div id="end" v-show="view.end">
            <ul class="indent-group">
                <li class="indent-item" v-for="indent of data.end">
                    <div class="indent-title" @click="goPage('house_res_detail.html?id='+indent.house_id)">
                        <span class="title" v-cloak>{{indent.title}}</span>
                        <span class="highlight" v-cloak>{{indent.status.value}}</span>
                    </div>
                    <i class="tieku"></i>
                    <div class="indent-info" @click="checkIndentDetail(indent.oid)">
                        <img class="indent-img" :src="fixImgUrl(indent.img)" alt="">
                        <div>
                            <span v-cloak>{{indent.start_date.split(" ")[0]}}至{{indent.end_date.split(" ")[0]}} &nbsp;&nbsp;共{{indent.day_total}}晚</span><br>
                            <span v-cloak>整套出租 - 入住{{indent.guest_count}}人</span><br>
                            <span v-cloak>订单总额：<span class="highlight">￥{{indent.pay_price}}</span></span>
                        </div>
                    </div>
                    <i class="tieku"></i>
                    <div class="btn-group">
                        <!--<span class="highlight" v-if="indent.deposit_status">操作押金</span>-->
                        <span class="highlight"
                              v-if="indent.status.status===6||indent.status.status===7||indent.status.status===8"
                              @click="goPage('comment_detail.html',{
                            data:{
                                id:indent.oid,
                                type:2
                            }
                        })">查看点评</span>
                        <span class="highlight" v-if="indent.status.status===6||indent.status.status===5" @click="goPage('landlord_comment.html',{
                            data:{
                                id:indent.oid
                            }
                        })">立即点评</span>
                        <!--<span @click="delete_order(indent.oid)">删除订单</span>-->
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div id="loadMore"></div>
</main>

@import "js.html"
<script src="../script/landlord_manage_indent.js"></script>
</body>
@import "footer.html"
